package com.bankapp.service.bank;

import com.bankapp.domain.bank.Bank;
import java.io.*;

public class BankDataLoaderService {
    private BankService bankService;

    public BankDataLoaderService(BankService bankService) {
        this.bankService = bankService;
    }

    public Bank loadBank(String pathToFile) {
        Bank bank = null;
        try (BufferedReader br = new BufferedReader(
                new InputStreamReader(
                        new FileInputStream(new File(pathToFile)
                        )))) {
            String line;
            while ((line = br.readLine()) != null) {
                System.out.println("> " + line);
            }
            br.close();
        } catch (IOException e1) {
            e1.printStackTrace();
        }
        return bank;
    }
}
